﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Core;
using Tanmia.Basis.Domain;
using Tanmia.NHibernate;

namespace Tanmia.Domain
{
    public class ItemDomain : BaseDomainObject<Item>
    {

        public ItemRepository ItemRep
        {
            get { return repository as ItemRepository; }
        }

        public ItemDomain()
        {
            repository = new ItemRepository();
        }

        public IList<Item> GetsWithSelect()
        {
            return GetsWithSelect(Gets(), Item.SelectItem);
        }

        public IList<Item> GetItemsInDiscriminatedItem()
        {
            return GetsWithSelect(ItemRep.GetsItemsInDiscriminatedItem(), Item.SelectItem);
        }
    }
}
